<!--
 * @Author: 董鑫6 3278028616@qq.com
 * @Date: 2024-09-19 20:38:56
 * @LastEditors: 董鑫6 3278028616@qq.com
 * @LastEditTime: 2024-09-19 20:41:07
 * @FilePath: \jquery-unmanned-vehicle\html\right2.html
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 图表上部分right2 地区销售占比 -->
<div>
  <div class="cb_title">
    <!-- 图标 -->
    <div class="icon"></div>
    <!-- 文字 -->
    <div class="text">地区销售占比</div>
  </div>
  <div id="right2_radar" class="plot_box"></div>
</div>

<!-- 获取数据绘制图表 -->
<script>
  const data = [
    { name: '吕梁', star: 10371 },
    { name: '太原', star: 7380 },
    { name: '大同', star: 7414 },
    { name: '晋中', star: 2140 },
    { name: '阳泉', star: 660 },
  ];
  const radarPlot = new Radar('right2_radar', {
    data: data.map((d) => ({ ...d, star: Math.sqrt(d.star) })),
    xField: 'name',
    yField: 'star',
    meta: {
      star: {
        min: 0,
        nice: true,
      },
    },
    area: {},
  });
  radarPlot.render();
</script>